import { defineConfig } from 'umi';
// import AuthWrapper from '@/wrappers/AuthWrapper';


export default defineConfig({
  fastRefresh: {} /* 让浏览器完成快速刷新 */,
  nodeModulesTransform: {
    type: 'none',
  },
  /*   antd: {//配置开启antd组件库的使用
      dark: false
    }, */
  title: '区块链浏览器' /* 配置标题 */,
  favicon: '/icon.png',

  /*   routes: [
      { path: '/login', component: '@/pages/Login' },
      { path: '/home', component: '@/pages/Home' },
      { path: '/detail', component: '@/pages/Detail' },
      { path: '/detail2', component: '@/pages/Detail2' },
      { path: '/', redirect: '/Login' },
    ], */

  routes: [
    { path: '/login', component: '@/pages/Login' },
    { path: '/home', component: '@/pages/Home', wrappers: ['@/wrappers/AuthWrapper'], },
    { path: '/detail', component: '@/pages/Detail', wrappers: ['@/wrappers/AuthWrapper'], },
    { path: '/detail2', component: '@/pages/Detail2', wrappers: ['@/wrappers/AuthWrapper'], },
    { path: '/', redirect: '/login' },
  ],

  proxy: {
    '/api': {
      target: 'http://10.1.40.119:8080/',
      changeOrigin: true,
    },
  },
});
